program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
  arr = array of integer;

var
  mass : array of arr;
  n, i, j : integer;

begin
  readln (n);
  setlength (mass, n);
  for i:= 0 to n-1 do
    setlength (mass[i], n);
  mass[0][0]:= 1;
  mass[1][1]:=1;
  mass[2][1]:= 1;
  for i:= 1 to n-1 do
    for j:= 2 to n-1 do
      mass[i][j]:= mass[i][j-1]+mass[i-1][j-1];
  for j:= 0 to n-1 do
  begin
    for i:= 0 to n-1 do
      if (mass[i][j]<>0) then
        write (mass [i][j], ' ');
      if (j=n-1) then
        write (1);
    writeln;
  end;
  readln;
  readln;
end.
